import React, { Component } from 'react'
import PropTypes from 'prop-types'

import './comment-list.css';
import CommentItems from '../comment-items/comment-items';
class CommentList extends Component {

    render() {
        const { commentArr,delcomment } = this.props
        return (
            <div>
                <div className="col-md-8">
                        <h3 className="reply">评论回复：</h3>
                        <h2 style={{"display":'none'}} > 暂无评论，点击左侧添加评论！！！</h2>
                        <ul className="list-group">
                            {
                               commentArr.map((comment,index)=><CommentItems key={index} comment={comment} delcomment ={delcomment} index={index}></CommentItems>) 
                            }
                            
                        </ul>
                    </div>
                
               
            </div>
            
        )
    }
}
CommentList.propTypes={
    commentArr:PropTypes.array.isRequired,
    delcomment:PropTypes.func.isRequired
}

export default CommentList
